package messages;

import gamecomponents.Position;
import java.io.Serializable;

public class HitMessage extends Message implements Serializable {

    private String message;
    private int x, y;
    private boolean HIT, LIVE;
    private Position p;

    public HitMessage(Position p, boolean HIT, boolean LIVE) {
        this.p = p;
        this.HIT = HIT;
        this.LIVE = LIVE;
    }

    public Position getP() {
        return p;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public boolean isHIT() {
        return HIT;
    }

    public boolean isLIVE() {
        return LIVE;
    }

    @Override
    public String getType() {
        return ("HitMessage");
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
